home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14988 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: news.erl.sbs.de!news
  2. From: Gerolf Wendland <wendland%hpp015%hpp001.mch2.scn.de@scn.de>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: big endian, little endian
  5. Date: Tue, 16 Apr 1996 14:52:43 +0200
  6. Organization: Siemens Business Services
  7. Message-ID: <3173981B.41C67EA6@scn.de>
  8. References: <4ku9dm$t1t@news.ycc.yale.edu> <3172C1E9.3E95@willows.com>
  9. NNTP-Posting-Host: 139.3.107.122
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=iso-8859-2
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (X11; I; SunOS 4.1.3 sun4m)
  14.  
  15. > rmurphy wrote:
  16. > >
  17. > > What is the difference between big-endian and
  18. > > little-endian?  
  19. > Actually it has nothing to with signed/unsigned integer rather it has to
  20. > do with how integers are represented in memory. If the
  21. > low byte is at the lower address then it uses little endian whereas if
  22. > the high byte is at the lower address then it used big endian.
  23. Exactly.
  24.  
  25. Our everyday decimal numbers might serve as an example of big endian numbers.
  26. 321 is 3 times hundred plus 2 times 10 plus 1 time one. This is just by convention
  27. or tradition or whatever. This convention helps us to differ between 24 and 42.
  28.  
  29. If the clever person who first invented that sort of reading decimal numbers had
  30. put it the other way round we would have read the number above as
  31. 3 times one plus 2 times ten plus 1 time one today. We might have called 
  32. it little endian then. Fortunately, every human dealing with decimal numbers obeys
  33. the big endian convention.
  34.  
  35. In the computer industry we deal with the Zahlensystem (number system?) of the base
  36. 256 if bytes are of 8 bit length and with both little and big endian machines.
  37.  
  38. And just to confuse the poor programmer there are some platforms (VAX, I guess) that
  39. have little endian as far as their word ordering is concerned and inside those
  40. words they're having big endian byte ordering (or just the other way round).
  41.  
  42. Yours confusingly,
  43. Gerolf
  44.